{% extends 'base.html.twig' %}
{% block body %}
    <table class="table table-striped">
        <thead>
        <tr>
            <td>Genus</td>
            <td># of species</td>
            <td># of scientists</td>
            <td>Last Updated</td>
        </tr>
        </thead>
        <tbody>
            {% for genus in genuses %}
                <tr>
                    <td>
                        <a href="{{ path('genus_show',{
                            "slug":genus.slug
                        }) }}">
                            {{ genus.name }}
                        </a>
                    </td>
                    <td>{{ genus.speciesCount }}</td>
                    <td>{{ genus.genusScientist|length }}</td>
                    <td>{{ genus.updatedAt|date('Y-m-d') }}</td>
                </tr>
            {% endfor %}
        </tbody>
    </table>
{% endblock %}